import query from '@dfeidao/atom-nodejs/db/query';
import log from '@dfeidao/atom-nodejs/logger/log';
interface Message {
	productid: string;
	client_point_id: string;
	asc: [];
	desc: [];
}

export default async function atom(msg: Message, action_id: string, session_id: string) {
	log('Service begin');
	// todo
	const { prepare, exec } = query(action_id, session_id, '12');
	prepare('tenant_level', ['level_no', 'level_name', 'order_num'], { productid: msg.productid }, 20, 1, msg.asc, msg.desc);
	const [data] = await exec();
	log('Service end');
	return { dataArray: data };
}
